<%--
 *  File:    DoctorSummary.jsp
 *  @Author: banshang
 *  Date:    2010/07/05
 *
 *  Copyright (C) 2000 - 2010 Oval Technologies, Inc.
 *  All rights reserved. 
 *
 *  This software is the confidential and proprietary information of Oval 
 *  Technologies, Inc. ("Confidential Information").  You shall not
 *  disclose such Confidential Information and shall use it only in
 *  accordance with the terms of the license agreement you entered into
 *  with Oval.
--%>

<%@ include file="/inc/SessionTimeout.inc"%>
<%@ page language="java" %>     
<%@ page import="java.util.*" %>
<%@ page import="org.apache.log4j.Category" %>

<%@ page contentType = "text/html;charset=UTF-8" %>
<%@ taglib uri="http://dcms.oval.com/page/dcms" prefix="dcms" %>
<%@ taglib uri="/WEB-INF/custom.tld" prefix="custom" %>

<% //--------------------------------------  setting logger --%>
<%
  	Category cat = Category.getInstance("jsp.DepartmentSummary"); 

  //init param
  String strModuleName = "ERM";
  String privilegeCode = "10386";
  String contextPath = request.getContextPath();
  String strTableName = "v_hospitalsummary";
 
%>
<% //--------------------------------------  include files list --%>
<%@ include file="/inc/Security.inc" %>
<%@ include file="/inc/FrmDefault.inc" %>
<%@ include file="/inc/PageDefault.inc" %>
<%@ include file="/inc/LocationDefault.inc" %>

<html>
<head>
<title>DoctorSummary</title>
<PageFlow:CheckPageFlow pageName="p_doctorsummary"/>
<link rel="stylesheet" href="<%=contextPath %>/css/<%= strLanguageCode %>/main.css" type="text/css">
<link rel="stylesheet" href="<%=request.getContextPath()%>/css/<%= strLanguageCode %>/summary.css" type="text/css">
<script language="JavaScript" src="<%=contextPath %>/css/<%= strLanguageCode %>/script.js"></script>
 <script language="JavaScript" src="<%=contextPath %>/js/ScriptLib.js"></script>
<%@ include file="/inc/SummaryDivision.inc" %>
<%@ include file="/inc/NewCalendar.inc" %>
<script>
var popwindow;
function popBusinessarea_moulty(){
	if(popwindow!=null) popwindow.close();
    url = '<%=contextPath %>/phap/phap.datp/masterdata/cm/dataclean/ZylStdareaSelect.jsp?<%= OvalTools.randomURL() %>';
    attribute = 'height=500, width=900,top=100,left=100,toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no, status=no';
	popwindow = window.open(url,'newwindow', attribute);
}

function setAreas(areaids,areanames,areacodes){

	document.__otherSearchConditionForm.areaids.value = areaids;
	document.__otherSearchConditionForm.businessareaname.value = areanames;
	//document.cform.businessareacode.value = areacodes;
} 
function page_selectHospital(){
	if(popwindow!=null) popwindow.close();
    url = '<%=contextPath %>/phap/masterdata/erm/HospitalSummaryForPop.jsp?<%= OvalTools.randomURL() %>&languagecode=<%= strLanguageCode %>&countrycode=CN&status=41';
    attribute = 'height=500, width=900,top=100,left=100,toolbar=n0, menubar=no, scrollbars=yes, resizable=no, location=no, status=no';
	popwindow = window.open(url,'newwindow', attribute);
}
 
function setHospital(id,code,name){
	document.__otherSearchConditionForm.hpid.value=id;
	document.__otherSearchConditionForm.hospitalcode.value=code;
	document.__otherSearchConditionForm.hospitalname.value=name;
}
function page_clear(){
	document.__otherSearchConditionForm.hpid.value="";
	document.__otherSearchConditionForm.hospitalcode.value="";
	document.__otherSearchConditionForm.hospitalname.value="";
	document.__otherSearchConditionForm.areaids.value = "";
	document.__otherSearchConditionForm.businessareaname.value = "";

}
function page_check(){
   if(!checkForm(document.__otherSearchConditionForm))return;
   return true;
}

function page_export(){
	var areaids=document.__otherSearchConditionForm.areaids.value;   
    if(isEmpty(areaids)){
     alert("省区不能为空!");
     popBusinessarea_moulty();
	 return;
	}
    __export('XLSX');
	 
}
</script>
</head>
<body>
<% 
  String str1 = label.getLabelName("L_BasicInfo");
  String str2 = label.getLabelName("L_ScienceTest");
  String str3 = label.getLabelName("L_ProdRelated");
%>
<dcms:summary id="erm.departmentsummary" summaryDataName="searchresults"  editTabID="mainTab" needEdit="true" >
	<dcms:summaryTab id="mainTab" name="<%=str1%>"  href="/zyl/masterdata/erm/DepartmentEdit.jsp"/> 
	<dcms:summaryTab id="jobTab" name="<%=str2%>"  href="/zyl/masterdata/erm/ReaserchTest.jsp"/> 
	<dcms:summaryAction actionFuction="page_export" labelCode="L_ALL_Execcd" styleWidth="70" privilegeCode="MB-KS02"/>
  <dcms:otherSearchCondition>
   <iframe id="reloadHandler" name="reloadHandler" style="display:none"></iframe>
     <table width="100%" cellspacing="0" cellpadding="0" border="0">
     <tr style="text-align:left" > 
     <td style="width:60px;"  class="need"> <%=label.getLabelName("L_Provicetdr") +  label.getLabelName("L_Colon") %></td>
	  <td  style="text-align:left"  > <custom:hidden  property="areaids" command="notnull" label="L_Provicetdr"/>
		<custom:text  property="businessareaname"  label="L_BusinessAreaName" readonly="true"/>
		&nbsp;<a onclick="popBusinessarea_moulty()"><custom:button type="3" value="*"/></a>
	  </td> 
	  </tr>
	 <tr style="text-align:left" > 
	  <td  style="width:60px;" ><%= label.getLabelName("L_BelongHospital") + label.getLabelName("L_Colon") %></td>
	   <td style="width:400px;" ><custom:text property="hospitalcode"  label="L_BelongHospital" /> 
		  <custom:hidden property="hpid"/> 
		  <a onclick="javascript:page_selectHospital();"><custom:button type="3" label="L_Asterisk" imgsrc="flash.gif" border="0" /></a>
	      <custom:text property="hospitalname" readonly="readonly" size="20" label="L_BelongHospital" />
	   </td>
	   <td>
	   &nbsp;&nbsp;<button button type="button" onclick="page_clear()" class="button1" name="re" value="clear"><%= label.getLabelName("L_Clear") %></button>
	   </td>
	 </tr>
     </table>
  </dcms:otherSearchCondition>  
</dcms:summary>
  
</body>
<script>
  document.getElementById("__searchvalue").onkeydown=function seachKeyDown()
  {
   // alert(event.keyCode);
    if(event.keyCode==13)
    {
      __summaryGo(document.getElementById("__summaryConfigID").value,document.getElementById("__indicatorImagePath").value,document.getElementById("__summaryRootPath").value,'');
    }
  }
</script> 
</html>